1. Field of the Invention
The present invention relates to an image processing method and device, and more particularly to a method and device for calculating the position of a comparative object by executing pattern matching between this comparative object and a reference image.
2. Prior Art
Pattern matching that uses a portion of a reference image constituting a known image as a template image in order to detect the position of a comparative object by detecting the position of this known image contained in an image of the comparative object is widely used in image processing technology.
A position detection method utilizing this pattern matching will be described using a wire bonding apparatus, which is a semiconductor assembly apparatus, as an example. In a wire bonding apparatus, wires consisting of a metal wires, etc., are bonded so that these wires connect bonding pads consisting of aluminum, etc., on the surface of a semiconductor chip and leads consisting of conductors formed so that these leads surround the semiconductor chip. Prior to this bonding operation, the bonding points which are the points where bonding is performed are calculated using pattern matching.
First, as shown in FIG. 18, alignment points which constitute reference points used for positional alignment are registered. In a wire bonding apparatus which has a structure that is as similar as in FIG. 1 in which a camera 7 that is fastened to an XY table 1 is moved in the horizontal direction relative to a semiconductor chip 14a by the operation of this XY table 1, such a registration is accomplished in the following manner: while an image from the camera 7 which has imaged the semiconductor chip 14 is displayed on the display screen of a monitor 39, the visual field is moved by moving the XY table 1 to which the camera 7 is fastened, so that the center point 32a of cross marks 32 that indicate the center of the visual field displayed on the display screen of the monitor 39 is aligned with an arbitrary point on the semiconductor chip 14a, and an input operation is performed by pressing an input switch, etc., of a manual input means 33. An image of the region surrounded by a rectangular reticle mark 42 centered on the center point 32a in this case is stored in memory as a template image, and the coordinates on the XY table 1 in this case are stored in a data memory 36 as an alignment point.
In regard to these alignment points, two locations (Pa1x, Pa1y) and (Pa2x, Pa2y) are generally selected for the pad side, and two locations (La1x, La1y) and (La2x, La2y) are generally selected for the lead side, from diagonal lines in the vicinity of the four corners of the semiconductor chip 14a in order to minimize the detection error.
Next, the coordinates of the respective bonding points are stored in the data memory 36 by pressing the input switch, etc., while aligning the center point 32a of the cross marks 32 with appropriate positions on the individual pads P and leads L, generally the approximate centers of the pads P, and points that are located at the approximate centers of the leads L with respect to the direction of width and at a fixed distance from the end of each lead L.
Then, as run time processing (i.e., processing at the time of production of the product), a new semiconductor device 14 is installed as a comparative object, the XY table 1 is moved by the control of the control section 34 so that the vicinity of the registered alignment point A0 constitutes the visual field of the camera 7 (FIG. 19), and an image of the semiconductor device 14 is acquired by the camera 7. Further, by pattern matching detection using a registered reference image, the reference image is superimposed on the image of the comparative object in relative positions which are such that the amount of coincidence between the image of the comparative object and the reference image shows a maximum value, and the amount of positional deviation (ΔX, ΔY) between the positional coordinates of the center point 32a in this attitude on the XY table 1 and the positional coordinates of the alignment point A0 on the XY table 1 (constituting the position of the center point 32a at the time that the template image is previously registered), e.g., (Pa1x, Pa1y) is determined.
The positional deviation is likewise calculated for all of the alignment points.
Then, the calculated amounts of positional deviation (ΔX, ΔY) are added to the positional coordinates of the alignment points determined at the time that the template image is previously registered, e.g., as (Pa1x+ΔX, Pa1y+ΔY), and the values thus obtained are taken as new alignment points Am.
Next, the actual bonding points are determined by calculating the positions of the respective pads and leads (this will be referred to below as “position correction”) from the positions of the new alignment points Am in such a manner that the relative positions of the respective pads and leads with respect to the alignment points A0 at the time of registration are preserved. Then, a bonding operation is next performed on these actual bonding points.
In cases where the semiconductor device 14, which is a comparative object, is disposed in an attitude that includes positional deviation in the rotational direction thereof, problems occur. Even if pattern matching detection using a registered reference image is performed, high-precision correction of the positions of the pads P and leads L cannot be accomplished.
The reason for the problems is as follows: in principle, if the image of the comparative object and the reference image are superimposed so that the amount of coincidence shows a maximum value for the pattern serving as a reference (the pads P in FIG. 19), the position of the new alignment point Am stipulated by the relative position with respect to the pattern serving as a reference should coincide with the position of the original alignment point A0 likewise stipulated by the relative position with the pads P in the reference image. However, as shown in FIG. 20, in a case where the semiconductor device 14, the comparative object, is disposed in an attitude that includes positional deviation thereof in the rotational direction, the original alignment point A0 and the new alignment point Am do not coincide even if the image of the comparative object and the reference image are superimposed so that the amount of coincidence shows a maximum value for the pattern serving as a reference (the pads P in FIG. 20).
On the other hand, it is sufficient if a point that tends not to be affected by the rotation of the attitude of the semiconductor device 14 constituting the comparative object is set as the alignment point. However, it is difficult for the operator to find such an alignment point. The error caused by this positional deviation of the comparative object in the rotational direction is not a problem if the pitch between the pads P or pitch between the leads L is sufficiently large. This error, however, has become a major problem in handling the reduction in pitch seen in recent years, i.e., the reduction in the pitch between the pads P and between the leads L.
Meanwhile, various methods have also been proposed in which pattern matching with the image of a comparative object is executed while the reference image is rotated (e.g., see Japanese Patent Application Laid-Open (Kokai) No. H09-102039). In the case of such methods, position detection that takes into account positional deviation in the rotational direction of a semiconductor device is possible. However, pattern matching in several increments in the rotational direction of the semiconductor device must be executed for numerous points in the visual field, so that the amount of calculation required is extremely large, thus slowing the recognition speed so that such methods are not practical.